import React, { Component , Children } from 'react';

import '../../styles/head.scss'
import styles from '../style';

class Header extends Component {
    constructor (props){
        super(props)
        this.style = styles
        this.style = this.verify(this.style)
        console.log(this.style);
    }

    verify(style){
        var obj = {}
        for(var key in style){
            this.props[key] ? obj[key] = this.props[key] : obj[key] = style[key]
        }
        return obj
    }

    render() {
        return (
            // <div className='head'>
            <div className='head' style={this.style}>
                <h1 style={{fontSize:this.style.fontSize , fontWeight : this.style.fontWeight}} >{this.props.children}</h1>
                {/* <h1>{this.props.children}</h1> */}
                <div className="set">
                    <div className="iconfont icon-gengduo"></div>
                    <div className="iconfont icon-circleyuanquan"></div>
                </div>
            </div>
        );
    }
}

export default Header;